Creating scripted plug-ins

Command

Path

Shortcut

Plug-in Manager

Tools > Plug-ins

Ctrl+Shift+Z (Windows)

Cmd+Shift+Z (Mac)

The Plug-in Manager displays three types of plug-ins:

Custom, unobfuscated plug-ins that you create

Third-party plug-ins, purchased from developers (obfuscated), and obfuscated plug-ins you create

Built-in, obfuscated plug-ins that are included with the Vectorworks program

Third-party plug-ins and built-in plug-ins, which are obfuscated, may allow limited editing of the plug-in parameters and definition. Options that are not available for editing are grayed.

Custom, unobfuscated plug-ins are created and edited from the Custom Plug-ins tab of the Plug-in Manager, where you can specify the plug-in type, category, parameters, options, and code for a new custom plug-in. Plug-ins are saved as described in Plug-in file location.

To create a plug-in:

Select the command.

The Plug-in Manager dialog box opens.

Click to show/hide the parameters.Click to show/hide the parameters.

Parameter

Description

Custom Plug-ins

 

Plug-ins list

Lists available custom plug-ins; the icon to the left of the plug-in name indicates the type of plug-in (see Plug-in types)

New

Creates a new custom plug-in as described in this section

Edit Definition

Opens the Edit Plug-in Definition dialog box, to define or edit the properties of the currently selected custom plug-in (see Plug-in definition)

Edit Script

Opens the Script Editor window, to create, rename, or edit the code that executes with the selected custom plug-in. See Specifying the plug-in script.

Duplicate

Creates a copy of the currently selected plug-in; specify a name for the copy in the Assign Name dialog box

Delete

Deletes the currently selected plug-in; this action cannot be undone

Third-party Plug-ins

Lists any third-party plug-ins, and allows third-party plug-ins to be installed, uninstalled, and customized as permitted.

Install: Select the installation files from the third-party script provider; they are automatically copied to your plug-ins folder. Vectorworks must be restarted before newly installed third-party plug-ins can be used.

Delete: Removes the plug-in from the Vectorworks program and deletes the plug-in files. This action cannot be undone.

Customize: When permitted by the third-party provider, a selected plug-in may allow limited customization. Options that are not available for editing are grayed.

Built-in Plug-ins

Lists the plug-ins available with the Vectorworks installation; some of these allow limited customization as permitted. Options that are not available for editing are grayed. An example of built-in plug-in customization is described in Customizing definitions for built-in plug-in objects.

From the Custom Plug-ins tab, click New.

The Assign Name dialog box opens. Enter the name of the new plug-in item and select the type of the plug-in to create. Plug-in names are limited to 27 characters in length. The appropriate plug-in extension will be appended to the plug-in name. Plug-ins can contain a Python script for execution.

Click to show/hide the parameters.Click to show/hide the parameters.

Parameter

Description

Name of the Script Plug-in

Specifies the name of the new plug-in; this is also the name of the plug-in file, automatically appended with the appropriate extension (.px.vsm, .vst, or .vso)

The plug-in will be created in

Describes the location of the plug-in file; plug-ins are saved in the location indicated so that they are not overwritten when installing a new version of Vectorworks products; see Plug-in file location

Plug-in type

Select the type of plug-in to create

Command

Menu command (.vsm) plug-ins can be used like any standard menu command item, performing operations on the active Vectorworks file. Menu commands can detect the view state of the active Vectorworks file, or can determine if a selection set exists upon which the menu command can act.

Tool

Tool item (.vst) plug-ins allow scripts to be added to a Vectorworks workspace as a tool palette item. Tools make use of the SmartCursor, and can respond to file state conditions such as selection status or view orientation.

Objects

Plug-in objects (.vso) allow the creation of complex objects such as standard architectural or mechanical elements, "smart" drawing components like callouts or drawing borders, or other flexible objects which streamline the design process. Plug-in objects support standard Vectorworks program core technologies such as snapping, classing, and advanced object editing; they can contain up to 32,767 parameters for defining and editing the object appearance.

Point Object

Point objects are defined by a single point click for placement

Linear Object

Linear objects require a user-defined line to create the basic geometry of the object

Rectangle Object

Rectangle objects utilize a user-defined rectangle to define and create the basic geometry of the object

2D/3D Path Object

Path objects define a user-defined polygonal path or NURBS curve to create the basic geometry of the object

Include File

Specifies an additional file (.vss or .px) to be included with a script

Define the plug-in properties as described in Specifying the plug-in definition.

Add the new plug-in to one or more workspaces with the Workspace Editor. See Customizing workspaces. Once the item has been added to a workspace, it is available to any open file in Vectorworks without the need for importing the associated script into the active file.

Specifying the plug-in definition

Concept: Scripted plug-ins

 

Was this page helpful?